<style lang="less">
	#toTop{
		width: 30px;
		height: 30px;
		position: fixed;
		bottom: 50px;
		right: 10px;
	}
</style>

<template>
	<div id="toTop" @click="onClick" v-if="show">
		<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
		<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
			 viewBox="0 0 286.054 286.054" style="enable-background:new 0 0 286.054 286.054;" xml:space="preserve">
		<g>
			<path style="fill:#1ABD9B;" d="M286.054,143.027C286.054,64.031,222.014,0,143.027,0S0,64.031,0,143.027
				s64.04,143.027,143.027,143.027S286.054,222.014,286.054,143.027z M259.236,143.027c0,64.192-52.026,116.2-116.209,116.2
				s-116.209-52.008-116.209-116.2c0-64.183,52.026-116.209,116.209-116.209S259.236,78.853,259.236,143.027z M203.527,137.637
				L151.85,86.54c-4.854-7.884-12.792-7.884-17.637,0l-51.686,51.096c-4.845,7.875-0.876,14.338,8.823,14.338h24.86v44.696
				c0,4.943,4.005,8.939,8.939,8.939h35.757c4.943,0,8.939-3.996,8.939-8.939v-44.696h24.86
				C204.412,151.966,208.381,145.512,203.527,137.637z"/>
		</g>
		
		</svg>
	</div>
</template>

<script>
	import scrollUtil from '../services/scrollUtil.js'
	
	export default{
		data(){
			return {
				show: false
			}
		},
		mounted(){
			let self = this;
			scrollUtil.scrollToHeightShow(0,()=>{
				self.show = true;
			});
		},
		methods:{
			onClick(){
				scrollUtil.scrollTop();
			}
		}
	}
</script>